In MPEG technology, the compressed digital system signal, or bitstream, which includes a video portion, an audio portion, and other informational portions, is transmitted to a receiver. Transmission may be over existing television channels, cable television channels, satellite communication channels, and the like.
A decoder is provided at the receiver to de-multiplex, decompress and decode the received system signal in accordance with a given compression algorithm. The decoded video and audio information is then output to a display device such as a television monitor for presentation to the user.
Video and audio compression and encoding is performed by suitable encoders which implement a selected data compression algorithm that conforms to a recognized standard or specification agreed to among the senders and receivers of digital video signals. Highly efficient compression standards have been developed by the Moving Pictures Experts Group (MPEG), including MPEG-1 and MPEG-2. The MPEG standards enable several VCR-like viewing options such as Normal Forward, Play, Slow Forward, Fast Forward, Fast Reverse, and Freeze.
The MPEG specification defines a hierarchical data structure in the video portion of the bitstream. A video sequence includes a sequence header, one or more groups of pictures, and an end-of-sequence code. A group of pictures is a series of one or more pictures intended to allow random access into the sequence.
A picture is the primary coding unit of a video sequence. A picture consists of three rectangular matrices representing luminance (Y) and two chrominance (Cb, Cr) values. The Y matrix has an even number of rows and columns. The Cb and Cr matrices are one-half the size of the Y matrix in each direction (horizontal and vertical). Thus, for every four luminance values, there are two associated chrominance values (one Cb value and one Cr value).
A slice is one or more contiguous macroblocks. Slices are important in the handling of errors. If the bitstream contains an error, the decoder can skip to the start of the next slice.
A macroblock is a 16×16 line section of luminance components and the corresponding chrominance components. A block is an 8×8 set of values of a luminance or chrominance component.
The MPEG standard defines three main types of video pictures:    1. Intracoded pictures (I-pictures) which are coded without reference to any other pictures.    2. Predictive-coded pictures (P-pictures) which are coded using motion-compensated forward prediction from a previous I or P reference picture.    3. Bidirectional predictive-coded pictures (B-pictures) which are coded using interpolated motion compensation from a previous and a future I or P picture.
I pictures are coded using only the Discrete Cosine Transform (DCT) which converts time and space domain into frequency and amplitude domain for the purpose of achieving data compression.
The macroblock is the basic motion compensation unit for P and B pictures. Each macroblock is coded by computing a motion compensation vector which defines the displacement between the macroblock, and the corresponding macroblock in the reference I or P picture(s) from which it is being predicted. If there is little or no motion, the motion compensation vector will not be transmitted.
A comparison macroblock is then generated by displacing the reference macroblock by the amount indicated by the motion compensation vector, which is then subtracted from the macroblock of the P or B picture that is being coded to produce an error signal which corresponds to the difference therebetween. The error signal is then coded using DCT (similar to an intracoded picture) and transmitted with the motion vector. If, however, the error signal is small or zero, no error component is transmitted.
Thus, a predictive coded macroblock (P or B) can consist of only a motion compensation component, only a transform (DCT) coded component, or both.
After motion compensation and DCT coding are performed, the macroblock is quantized, and Variable Length Coded (VLC) to further compress the data bitstream. The macroblocks are then assembled into slices, pictures, groups of pictures and video sequences, multiplexed with associated audio data, and transmitted to a user for decoding and presentation.
The basic idea behind MPEG video compression is to remove spatial redundancy within a video frame and temporal redundancy between video frames. As in JPEG, the standard for still image compression, DCT-based (Discrete Cosine Transform) compression is used to reduce spatial redundancy. Motion- compensation is used to exploit temporal redundancy. The images in a video stream usually do not change much within small time intervals. The idea of motion-compensation is to encode a video frame based on other video frames temporally close to it.
A video stream is a sequence of video frames. Each frame is a still image. A video player displays one frame after another, usually at a rate close to 30 frames per second (23.976, 24, 25, 29.97, 30).
Frames are digitized in a standard RGB format, 24 bits per pixel (8 bits each for Red, Green, and Blue). MPEG-1 is designed to produce bit rates of 1.5 Mb/s or less, and is intended to be used with images of size 352×288 at 24–30 frames per second. This results in data rates of 55.7–69.6 Mb/s.
Frames are divided into 16×16 pixel macroblocks. Each macroblock consists of four 8×8 luminance blocks and two 8×8 chrominance blocks(1 U and 1 V). Macroblocks are the units for motion-compensated compression. Blocks are used for DCT compression. Frames can be encoded in three types: intra-frames (I-frames), forward predicted frames (P-frames), and bi-directional predicted frames (B-frames).
An MPEG-1 video sequence is an ordered stream of bits, with a special bit pattern sequences marking the beginning and ending of a logical section.
Typically, in real-time MPEG video decoders, which are used in today's set-top boxes or DVD players, a decoding algorithm in application-specific integrated circuits (ASIC's) is implemented. In such cases, key functional operations such as Variable Length Decoding (VLD), Inverse Zig-Zag Scan (IZZ), Inverse Quantization (IQ), Inverse Discrete Cosine Transform (IDCT), Motion Compensation (MC) and Merge and Store (MS) are mapped to dedicated hardware, herein referred to as application specific integrated circuits (ASICs) In one approach, the MPEG bitstream that is to be decoded is stored in a DRAM buffer in a decoder system. The MPEG bitstream that is to be decoded is herein referred to as “bitstream”.
FIG. 1 is a simplified block diagram that illustrates some components of a typical MPEG-2 video bitstream decoder core. In FIG. 1, reconstructed data 102 is the bitstream that is to be decoded and is shown as an input into the dynamic random access memory (DRAM) interface 104. DRAM interface 104 is communicatively coupled to DRAM buffer 106, MC module 108, VLD/IZZ/Q module 114 and MS module 112. In addition, MC module 108 is communicatively coupled to MC buffer 110, which in turn is communicatively coupled to MS module 112. VLD/IZZ/IQ module 114 is communicatively coupled to IDCT module 116, which in turn is communicatively coupled to IDCT buffer 118.
The data and data paths referred to herein are associated with reconstructed data 102. There are two main data paths for decoding reconstructed data 102: 1) one data path is for spatial data reconstruction, and 2) one data path is for temporal data reconstruction. The spatial data path goes through the VLD/IZZ/IQ module 114 and IDCT module 116, and the resulting data is written into IDCT buffer 118. The temporal data path, which comprises MC module 108, gets reference data from previously reconstructed data stored in memory. The resulting data coming out of MC module 108 is written to MC buffer 110.
In the final steps of data reconstruction, MS module 112 performs the following: 1) reads in spatial data from the IDCT buffer and reads in temporal data from the MC buffer, 2) adds the data that is read from the MC buffer to the data that is read from the IDCT buffer to produce a combined data set of reconstructed data, and 3) writes the combined data set to DRAM buffer 106 where the reconstructed data is stored
All the above operations involve data fetch and store in different addressing schemes. The spatial data path is block based or 8×8 based, while the temporal data path is macroblock based or 16×16 based or 16×8 based. Thus, the MS module handles both block based and macroblock based addressing schemes when adding spatial and temporal data together. In addition, there are many flags in the bitstream which make the IDCT/MC buffer accessing mechanism quite complicated.
In one approach, the ASIC implementation of MPEG video decoding, such as the decoding performed by VLD/IZZ/IQ, IDCT, MC and MS modules, is designed using a pipeline architecture. In a pipeline architecture, the IDCT buffer and the MC buffer require different read/write address pattern sequences. Traditionally, each buffer has its own associated address generator in order to simultaneously facilitate data access. The drawback of pipeline architecture is more hardware consumption, which in turn consumes more power.
Therefore, in past approaches, decoders require a large amount of hardware in terms of gate count and power consumption. Because of the higher level of logic complexity, the effort required to test and debug a decoder is also large. Also, the different addressing schemes of each data path in the decoding process require different types address generators.
Based on the foregoing, there is a need for a method or mechanism for unifying addressing schemes used in MPEG decoding.